package com.situ.onlinebookstore.common.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;
import java.util.List;

/**
 * 类与类之间的关系
 * 继承
 * 合成（组合 聚合）
 * 依赖
 * 没关系
 */
@Data
@NoArgsConstructor
@ToString
public class Order {
    private String id;
    @JsonFormat(pattern = "yyyy年MM月dd日 HH:mm", timezone = "GMT-8")
    private Date createTime;
    private Integer status;
    private String express;
    private Integer payType;
    private Integer userId;
    private Integer addrId;
    private String addrDetail;
    private String userName;

    private List<OrderDetail> details;
    private List<Cart> carts;
}
